package desinpattern.interfaceabstract;

public class Student {
	public static void main(String[] args) {
		Student student = new Student();
		student.setName("Loc");
		student.setPoint(10);
		student.setUniversity(new UniversitA());
		System.out.println(student.display());
		
		student.setName("Du");
		student.setPoint(10);
		student.setUniversity(new UniversitB());
		System.out.println(student.display());
	}
	private String name;
	private int point;
	public University university;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getPoint() {
		return point;
	}
	public void setPoint(int point) {
		this.point = point;
	}
	public University getUniversity() {
		return university;
	}
	public void setUniversity(University university) {
		this.university = university;
	}
	
	public String display() {
		return name + "-" + university.tinhDiem(point);
	}
	
}
